package com.rule.rules.impl.loan.ruleengine;

import com.rule.rest.RuleNamespace;
import com.rule.rule.engine.InferenceEngine;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
 * 为了为贷款应用程序或域创建规则引擎，我们必须扩展 InferenceEngine
 * 并且需要实现两个抽象方法。对于此推理引擎，INPUT_DATA 将是 UserDetails 对象，而 OUTPUT_RESULT 将是 LoanDetails 对象
 */
@Slf4j
@Service
public class LoanInferenceEngine extends InferenceEngine<UserDetails, LoanDetails> {

    @Override
    protected RuleNamespace getRuleNamespace() {
        return RuleNamespace.LOAN;
    }

    @Override
    protected LoanDetails initializeOutputResult() {
        return LoanDetails.builder().build();
    }
}
